

public class test {




    public static void main15(String[] args) {
        PetDog dogh=new PetDog();
        dogh.name="小七";
        dogh.age=10;
        dogh.color="huangse";
        dogh.barks();
        dogh.wag();
    }



    public static void main14(String[] args) {
        int a=20,b=10,c=a%b;
        while (c!=0){
            a=b;
            b=c;
            c=a%b;
        }
        System.out.println(b);
    }
   public static void main13(String[] args) {
        int i=0;
        while (i<999999999){
            int count=0;

                int temp=i;
                while(temp!=0){
                    temp/=10;
                    count++;
            }
          temp=i;
            int sum=0;
            while(temp!=0){
                sum+=Math.pow(temp%10,count);
                temp/=10;
            }
            if(i==sum){
                System.out.println(count+"位的自幂数为"+i);
            }
            i++;
        }

    }



    public static void main12(String[] args) {
        //  编写程序数一下 1到 100 的所有整数中出现多少个数字9
        int count = 0;
        for (int n = 1; n < 100; n++) {
            if (n % 10 == 9) {
                count++;
            }
            if (n / 10 == 9) {
                count++;
            }
        }
        System.out.println(count);
    }


    public static void main11(String[] args) {
        int year=1000;
        while (year<=2000){
            if((year%100!=0&&year%4==0)||year%400==0){
                System.out.print(year+"是闰年 ");
            }
            year++;
        }

        }
//素数打印
    public static void main10(String[] args) {
        for (int i=1;i<100;i++){
            for(int j=2;j<=Math.sqrt(i);j++){
                if(i%j==0){
                 j++;
                    break;
                }else {
                    System.out.print(i+" ");
                    break;
                }
            }

        }
    }
    ////找出1-100之间 既能被3整除 也能被4整除的所有数字
   public static void main9(String[] args) {
         for(int a=1;a<=100;a++){
             if(a%3==0&&a%4==0){
                 System.out.print(a+" ");
             }

         }
    }


    public static void main8(String[] args) {
        int n=1,ret=1,j=1,sum=0;
     while (j<=5) {
         while (n <=j) {
             ret *= n;
             n++;
         }j++;
         sum+=ret;
     }
        System.out.println(sum);
    }



    public static void main7(String[] args) {
        int n=0, sum=0;
        while (n<100){
            sum+=n;
            n++;
        }
        System.out.println(sum);
    }
    public static void main6(String[] args) {
     int num=0;
     while(num<10){
         num++;
         System.out.println(num);
     }
    }
    //能被4整除的年份通常是闰年。
    //但是，能被100整除的年份不是闰年，除非它同时能被400整除。
    public static void main5(String[] args) {
        int year=2000;
        if((year%100!=0&&year%4==0)||year%400==0){
            System.out.println(year+"是闰年");
        }else{
            System.out.println(year+"不是闰年");
        }
    }
    public static void main4(String[] args) {
        int year = 2025;
        if (year % 100 != 0) {
            if (year % 4 == 0) {
                System.out.println(year + "是闰年");
            } else {
                System.out.println(year + "不是闰年");
            }
        } else {
            if (year % 400 == 0) {
                System.out.println(year + "是闰年");
            } else {
                System.out.println(year + "不是闰年");
            }
        }


    }

    public static void main3(String[] args) {
       int a=16;
       if(a%2==0){
           System.out.println(a+"是偶数");
         }else{
           System.out.println(a+"是奇数");
    }}
    public static void main2(String[] args) {
        int a=10;
        if(a>10){
            System.out.println(">");
        } else if (a<10) {
            System.out.println("<");
        }else {
            System.out.println("=");
        }
    }

    public static void main1(String[] args) {
        System.out.println("aaa");
        System.out.println("bbb");
        System.out.println("张晓婧我想你了");
    }
}
